home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / faq / faqs / x_faq / speedups < prev   
Encoding:
Internet Message Format  |  1992-12-27  |  23.9 KB

  1. Xref: bloom-picayune.mit.edu comp.windows.x:62130 news.answers:4669
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!news.media.mit.edu!micro-heart-of-gold.mit.edu!news.bbn.com!olivea!sun-barr!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!cs.ubc.ca!alberta!art
  3. From: art@cs.UAlberta.CA (Art Mulder)
  4. Newsgroups: comp.windows.x,news.answers
  5. Subject: comp.windows.x: Getting more performance out of X.  FAQ
  6. Summary: This posting contains a list of suggestions about what you can do to get the best performance out of X on your workstation -- without buying more hardware.
  7. Keywords: FAQ speed X
  8. Message-ID: <art.724532420@warspite>
  9. Date: 16 Dec 92 19:00:20 GMT
  10. Sender: news@cs.UAlberta.CA (News Administrator)
  11. Reply-To: art@cs.ualberta.ca (Art Mulder)
  12. Followup-To: poster
  13. Organization: University of Alberta, Edmonton, Canada
  14. Lines: 556
  15. Approved: news-answers-request@MIT.Edu
  16. Nntp-Posting-Host: warspite.cs.ualberta.ca
  17.  
  18. Archive-name: x-faq/speedups
  19. Last-modified: 1992/12/16
  20.  
  21. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  22.  
  23.         HOW TO MAXIMIZE THE PERFORMANCE OF X -- monthly posting
  24.  
  25.   More RAM, Faster CPU's, More disk space, Faster Ethernet...  These are
  26.   the standard responses you get when you ask about how to make your
  27.   workstation go faster.
  28.  
  29.   Well, more hardware isn't always an option, and I wonder if more
  30.   hardware is really always even a necessity.
  31.  
  32.   This "FAQ" list is a collection of suggestions and ideas from different
  33.   people on the net on how you can the best possible performance from your
  34.   workstation, WITHOUT PURCHASING MORE HARDWARE.
  35.  
  36.   This document is specifically concerned with X.  I realize that there are
  37.   a whole host of other factors that affect the performance of a
  38.   workstation.   Perhaps at some point, this document will grow into a
  39.   generalized "System Performance Tuning" document, but for now our focus is
  40.   on X.
  41.     [ Note: People seriously interested in the whole area of system
  42.     performance, might want to look at the O'Reilly nutshell book
  43.     "System Performance Tuning" by Mike Loukides.  I've seen it,
  44.     but not read it, so I can't comment on its content.  --ed.]
  45.  
  46. -----------------
  47. Table of Contents
  48. -----------------
  49.   1. What about the "Other X FAQ"?
  50. ! 2. Window Managers
  51.   3. The X Server
  52.        Which Server?
  53.        Starting your Server
  54.        Fonts
  55. !      About the Resources File
  56.        Define Your Display Properly
  57. ! 4. Clients
  58. !      A Better Clock for X
  59.        A Better Terminal Emulator for X
  60.   5. Miscellaneous Suggestions
  61.        Pretty Pictures
  62.        A Quicker Mouse
  63.        Programming Thoughts
  64. !      Say What!?
  65.   6. Other Sources of Information
  66.   7. Author & Notes
  67.   
  68. -----------------------------
  69. What about the "Other X FAQ"?
  70. -----------------------------
  71.  
  72.   David B. Lewis (faq%craft@uunet.uu.net) maintains the informative and
  73.   well written "comp.windows.x Frequently Asked Questions" document.
  74.   Its focus though, is on generally useful X information, while this
  75.   FAQ is concerned with the issue of performance.
  76.  
  77.   The comp.windows.x FAQ does address the issue of speed, but only with
  78.   regards to the X server.  The gist of that topic seems to be:
  79.     "Use X11R5, it is faster than R4".
  80.   (Please see the X FAQ for complete details).
  81.  
  82.   Performance is a subjective issue.  The individual user must balance
  83.   `speed' versus `features' in order to come to a personal decision.
  84.   Therefore this document can be be expected to contain many subjective
  85.   opinions in and amongst the objective facts.
  86.  
  87. ---------------
  88. Window Managers
  89. ---------------
  90.  
  91.   There are a lot of window managers out there, with lots of different
  92.   features and abilities.  The choice of which to use is by necessity a
  93.   balancing act between performance and useful features.  At this
  94.   point, most respondents have agreed upon "twm" as the best candidate
  95.   for a speedy window manager. 
  96.  
  97.   A couple of generic tricks you can try is turning off unnecessary
  98.   things like "zooming" and "opaque move".  Also, if you lay out your
  99.   windows in a tiled maner, you reduce the amount of cpu power spent
  100.   in raising and lowering windows.  
  101.                     Joe English (joe@trystero.art.com)
  102.  
  103.   I've found that a good font for tiling is 7x13 (aka:
  104.   -misc-fixed-medium-r-normal--13-100-100-100-c-70-iso8859-1 ) It is
  105.   the biggest font I have found that I can use on a SPARC ELC and still
  106.   get two 80 column terminal windows side-by-side on the display with
  107.   no overlap.  Other suggestions will be accepted.
  108.  
  109. ------------
  110. The X Server
  111. ------------
  112.  
  113. Which Server?
  114. - - - - - - -
  115.  
  116.   Doesn't the old saying go: "Use the right tool for the job"?  This
  117.   applies to the X11 server also.  Make sure that your server is a
  118.   proper match for your hardware platform.  If you have a monochrome
  119.   monitor, use a monochrome X11 server.
  120.  
  121.   On my Monochrome Sun ELC, I haven't noticed much difference between
  122.   the Xsun (colour) server and XsunMono, however it was pointed out to
  123.   me that XsunMono is about 800k smaller and therefore should contribute
  124.   to less paging.  
  125.          [ thanks to: Jonny Farringdon (j.farringdon@psychol.ucl.ac.uk),
  126.                         Michael Salmon (Michael.Salmon@eos.ericsson.se) ]
  127.  
  128.   How your server was compiled can also make a difference.  Jeff Law
  129.   (law@schirf.cs.utah.edu) advises us that on a Sun system, X should
  130.   be compiled with gcc2.* or with the unbundled Sun compiler, and *not*
  131.   use the the SunOS 4.1.1 bundled compiler.  You can expect to get
  132.   "*very* large speedups in the server" that way.  I would assume that
  133.   similar results would occur if you used one of the other popular
  134.   high-quality commercial compilers on the market.
  135.  
  136. Starting your Server
  137. - - - - - - - - - - -
  138.  
  139.   Joe English (joe@trystero.art.com) :
  140.     If you start up a lot of clients in your .xsession or whatever, sleep
  141.     for a second or two after launching each one.  After I changed my
  142.     .xclients script to do this, logging in actually took *less* time...
  143.     we have a heavily loaded system without much core, though.
  144.  
  145.   This sounds crazy, but I tried it, and it works!  
  146.  
  147.   Warner Losh (imp@Solbourne.COM) provided me with a good explanation of
  148.   why this works, which I have summarized here:
  149.  
  150.     When you start up an X server it takes a huge amount of time to
  151.     start accepting connections.  A lot of initialization is done by
  152.     the server when it starts.  This process touches a large number of
  153.     pages.  Any other process running at the same time would fight the
  154.     server for use of the CPU, and more importantly, memory.  If you
  155.     put a sleep in there, you give the Server a chance to get itself
  156.     sorted out before the clients start up.
  157.  
  158.     Similarly, there is also a lot of initialization whenever an X
  159.     client program starts: toolkits registering widgets, resources
  160.     being fetched, programs initializing state and "databases" and so
  161.     forth.  All this activity is typically memory intensive.  Once this
  162.     initialization is done ("The process has reached a steady state"),
  163.     the memory usage typically settles down to using only a few pages.
  164.     So, by using sleeps to stagger the launching of your clients in
  165.     your .Xinitrc , you avoid them "fighting" each other over your
  166.     workstations limited resources
  167.  
  168.   This is most definitely a "Your Mileage May Vary" situation, as there
  169.   are so many variables to be considered: available RAM, local swap
  170.   space, load average, number of users on your system, which clients
  171.   you are starting, etc.
  172.  
  173.   Currently in my .xinitrc I have a situation like:
  174.     (sleep 1; exec xclock ) &
  175.     (sleep 1; exec xbiff ) &
  176.     (sleep 1; exec xterm ) &
  177.     (sleep 1; exec xterm ) &
  178.     (sleep 1; exec xterm ) &
  179.  
  180.   I've experimented with:
  181.     (sleep 1; exec xclock ) &
  182.     (sleep 2; exec xbiff ) &
  183.     (sleep 3; exec xterm ) &
  184.     (sleep 4; exec xterm ) &
  185.     (sleep 5; exec xterm ) &
  186.  
  187.   I've even tried:
  188.     (sleep 2; exec start_X_clients_script ) &
  189.   and then in start_X_clients_script I had:
  190.     (sleep 1; exec xclock ) &
  191.     (sleep 1; exec xbiff ) &
  192.     (sleep 1; exec xterm ) &
  193.     (sleep 1; exec xterm ) &
  194.     (sleep 1; exec xterm ) &
  195.  
  196.     [ The idea with this last one was to make sure that xinit had
  197.     completely finished processing my .xinitrc, and had settled down
  198.     into a "steady state" before the sleep expired and all my clients
  199.     were launched. ]
  200.  
  201.   All of these yielded fairly comparable results, and so I just stuck with
  202.   my current setup, for its simplicity.  You will probably have to
  203.   experiment a bit to find a setup which suits you.
  204.  
  205. Fonts
  206. - - -
  207.  
  208.   Loading fonts takes time, and RAM.  If you minimize the number of fonts
  209.   your applications use, you'll get speed increases in load-up time.
  210.  
  211.   Farrell McKay (fbm@ptcburp.ptcbu.oz.au) :
  212.     One small point I've noticed (not specifically related to R5) is that
  213.     clients will always start up more quickly if they don't have to load a
  214.     new font into the server.  So I only use two or three fonts throughout
  215.     the whole of my X environment.  Sometimes I need to use a Kanji font
  216.     (for my work) at intervals throughout the day, so in the morning I
  217.     start up xfd with that font (that loads it into the server), iconify
  218.     it, and leave it there for the rest of the day.  Pre-loaded fonts sure
  219.     cut down initialization time.
  220.  
  221.   Joe English (joe@trystero.art.com) :
  222.     Carefully choose a small number of fonts (one fixed-width, one roman,
  223.     one sans-serif, one large one, whatever else you need) and
  224.     reconfigure all the applications you use to use only those fonts.
  225.     This will conserve server resources and make applications start up
  226.     faster.  Loading fonts takes a long time.
  227.  
  228.   Oliver Jones (oj@roadrunner.pictel.com):
  229.     Keep fonts local to the workstation, rather than loading them over nfs.
  230.     If you will make extensive use of R5 scalable fonts, use a font server.
  231.  
  232. About the Resources File
  233. - - - - - - - - - - - - -
  234.  
  235.   Joe English (joe@trystero.art.com) :
  236.     Keep your .Xresources and .Xdefaults file small.  Same effect as
  237.     [reducing the number of fonts].  
  238.  
  239.   In your .Xdefaults (.Xresources) file, try just putting the minimum
  240.   amount of resources that you want to have available to all your
  241.   applications.  For example:  *reverseVideo: true
  242.  
  243.   Then, separate your resources into individual client-specific
  244.   resource files.  For Example: I store mine in $HOME/lib/app-defaults.
  245.   In my .login file I set the environment variable XUSERFILESEARCHPATH:
  246.       setenv XUSERFILESEARCHPATH $HOME/lib/app-defaults/%N
  247.  
  248.   So, when I launch an xterm, it loads its resources from
  249.   ...app-defaults/XTerm.  Xdvi finds them in .../app-defaults/XDvi,
  250.   and so on and so forth.  Not all clients follow the same class-naming
  251.   convention, so you may have some fun figuring out what to call the
  252.   resource file (xterm? Xterm? XTerm?).  In general, try following the
  253.   standard XXxxx pattern first.
  254.  
  255.   This method of organizing your personal resources has the following
  256.   benefits:
  257.  
  258.   - Easier to maintain/ more usable.
  259.  
  260.   - Fewer resources are stored in the X server in the RESOURCE_MANAGER
  261.     property.  As a side benefit your server may start fractionally
  262.     quicker, since it doesn`t have to load all your resources.
  263.  
  264.   - Applications only process their own resources, never have to sort 
  265.     through all of your resources to find the ones that affect them.
  266.  
  267.   - the application that you are interested in has to load an additional
  268.     file every time it starts up.  This doesn't seem to make that much of a
  269.     performance difference, and you might consider this a huge boon to
  270.     usability.  If you are modifying an application's resource database,
  271.     you just need to re-run the application without having to "xrdb" again.
  272.  
  273.   This is all documented in the Xt Specification (pg 125 & 666).
  274.             [Thanks to: Kevin Samborn (samborn@mtkgc.com)
  275.              and Michael Urban (urban@cobra.jpl.nasa.gov) ]
  276.  
  277.   The "comp.windows.x Frequently Asked Questions" FAQ list contains an
  278.   excellent explanation of how these environment variables work.
  279.  
  280.   NOTE: xrdb will by default run your .Xdefaults file through cpp.
  281.     When your resources are split out into multiple resource files
  282.     (as described above) and then loaded by the individual client
  283.     programs, they will NOT be processed first through cpp.  
  284.     WATCH OUT FOR THIS!!
  285.  
  286.     I had C style comments in my .Xdefaults file, which cpp
  287.     stripped out.  When I switched to this method of distributed
  288.     resource files I spent several frustrating days trying to
  289.     figure out why my clients were not finding their resources.  Xt
  290.     did *NOT* provide any error message when it encountered those C
  291.     style comments in the resource files, it simply silently
  292.     aborted processing that resource file.
  293.  
  294.     The loss of preprocessing (which can be very handy, e.g. ``#ifdef
  295.     COLOR'' ...) is enough to cause some people to not be interested in
  296.     this method of resource management.
  297.  
  298.   You may also run into some clients which break the rules.  For example,
  299.   neither Emacs (18.58.3) nor Xvt (1.0) will find their resources if they
  300.   are anywhere other than in .Xdefaults.
  301.  
  302.   On other ``gotcha'' to watch out for is starting up a client on a
  303.   machine that does not share files with the machine where your
  304.   resources are stored.   In this case your client will not find its
  305.   resources.  Loading all your resources into the server will guarantee
  306.   that all of your clients will always find their resources.
  307.                                 Casey Leedom (casey@gauss.llnl.gov)
  308.  
  309. Define Your Display Properly
  310. - - - - - - - - - - - - - - -
  311.  
  312.   Client programs are often executed on the same machine as the server.  In
  313.   that situation, rather than setting your DISPLAY environment variable to 
  314.   "<hostname>:0.0", where <hostname> is the name of your workstation, you
  315.   should set your DISPLAY variable to "unix:0.0" or ":0.0".  By doing this
  316.   you access optimized routines that know that the server is on the same
  317.   machine and use a shared memory method of transferring requests.
  318.             [thanks to Patrick J Horgan (pjh70@ras.amdahl.com)]
  319.  
  320.   See the _DISPLAY NAMES_ section of the X(1) man page for further
  321.   explanation of how to properly set your display name.
  322.  
  323. -------
  324. Clients
  325. -------
  326.  
  327.   If you only have a few megabytes of Ram then you should think
  328.   carefully about the number of programs you are running.  Think also
  329.   about the _kind_ of programs you are running.  For example:  Is there
  330.   a smaller clock program than xclock?
  331.  
  332.   Unfortunately, I haven't really noticed that programs advertise how large
  333.   they are, so the onus is on us to do the research and spread the word.
  334.  
  335.   [ Suggestions on better alternatives to the some of the standard clients
  336.   (eg: Xclock, Xterm, Xbiff) are welcome.  --ed.]
  337.  
  338.   One thing to note on systems with shared libraries, is that once Xaw,
  339.   Xt, Xlib, etc are loaded, they don't have to be loaded again.  So if
  340.   you already have an Athena program loaded, xclock won't add much to
  341.   the load.  This is an argument against non-Athena programs, that load
  342.   extra code.  The moral of this story is to keep to one set of
  343.   libraries -- don't mix your toolkits (e.g. XView and Xt).
  344.       Duncan Sinclair (sinclair@dcs.gla.ac.uk | sinclair@uk.ac.gla.dcs) 
  345.  
  346. A Better Clock for X
  347. - - - - - - - - - - -
  348.  
  349.   Richard Hesketh (rlh2@ukc.ac.uk) :
  350.     xbiff and xclock are written using the X toolkit and are therefore
  351.     rather large ...
  352.  
  353.   Duncan Sinclair (sinclair@dcs.gla.ac.uk) told me about ``xcuckoo'', which
  354.   displays a clock in the title bar of *another* program.  Saves screen real
  355.   estate.  I haven't tried this one out yet.  Find it on export...
  356.  
  357.   der Mouse (mouse@Lightning.McRCIM.McGill.EDU) :
  358.     For your consideration I offer mclock, my clock program.  It is
  359.     non-Xt-based, which alone should help, and is extensively
  360.     configurable:  it can be made to look very much like MIT oclock, or
  361.     mostly like xclock purely by changing resources.
  362.  
  363.     You can get this by anonymous ftp from larry.mcrcim.mcgill.edu
  364.     (132.206.1.1), /X/mclock.shar
  365.  
  366.   I've tried this clock program out, and it works fine, but I haven't tried
  367.   any extensive testing to see how it compares to xclock in resource
  368.   consumption.  One point: don't let the size of the executable fool you.
  369.   The binary on my site is about 2.5 times the size of Xclock, but the
  370.   author pointed out to me that mclock does *not* drag in Xaw, Xmu, or Xt,
  371.   which Xclock does.  Therefore, it should be lighter when running.
  372.  
  373.   Of course, the ultimate clock --- one that consumes no resources, and 
  374.   takes up no screen real estate --- is the one that hangs on your wall.
  375.   :-) 
  376.  
  377. A Better Terminal Emulator for X
  378. - - - - - - - - - - - - - - - - -
  379.  
  380.   From the README file distributed with xterm:
  381.  
  382.   +-----
  383.   |         Abandon All Hope, Ye Who Enter Here
  384.   |
  385.   | This is undoubtedly the most ugly program in the distribution.
  386.   | ...
  387.   +-----
  388.  
  389.   Ugly maybe, but at my site it's still the most used.  I suspect that
  390.   xterm is one of the most used clients at many, if not most sites.
  391.   Laziness?  Isn't there a better terminal emulator available?  See below.
  392.  
  393.   If you must use xterm, you can try reducing the number of saveLines
  394.   to reduce memory usage.  [ Oliver Jones (oj@roadrunner.pictel.com),
  395.                    Jonny Farringdon (j.farringdon@psychol.ucl.ac.uk) ]
  396.  
  397. 1) Xvt
  398.  
  399.   Richard Hesketh (rlh2@ukc.ac.uk) :
  400.     ... if you don't need all the esoteric features of xterm, then get
  401.     hold of xvt from export.lcs.mit.edu:/contrib/xvt-1.0.tar.Z, it was
  402.     written here just to save swap space as xterm is rather a hog!
  403.  
  404.   I've since obtained and am evaluating 'xvt' and it does seem to me
  405.   to be noticeably faster than xterm, while yet coming off as a full
  406.   featured "clone" of xterm -- you don't even have to rename your xterm
  407.   resources as xvt pretends to be XTerm.  It is missing a few xterm
  408.   features to which I've grown accustomed, but I'm giving it a try.
  409.  
  410. 2) mterm
  411.  
  412.   der Mouse (mouse@Lightning.McRCIM.McGill.EDU) :
  413.     I also have my own terminal emulator.  Its major lack is
  414.     scrollback, but some people like it anyway.  It can be had from [
  415.     larry.mcrcim.mcgill.edu (132.206.1.1) ], in
  416.     /X/mterm.src/mterm.ball-o-wax.
  417.  
  418. -------------------------
  419. Miscellaneous Suggestions
  420. -------------------------
  421.  
  422. Pretty Pictures
  423. - - - - - - - -
  424.  
  425.   One of the things I did when first learning to use X, was experiment with
  426.   using different images as the background on my display.  (via xsetroot, or
  427.   xphoon, etc).  I soon abandoned this practise for some very good reasons:
  428.  
  429.   - The more complicated your root window bitmap, the slower the server
  430.     is at redrawing your screen when you reposition windows (or redraw, etc)
  431.  
  432.   - These take up RAM, and CPU power.  I work on a Sun SPARC ELC with 8mb
  433.     RAM and I'm looking for more power, I can't comprehend it when I see
  434.     people with a 4mb Sun 3/60 running xphoon as their root window.
  435.  
  436.   If you're anything like me, you need all the screen real estate
  437.   that you can get for clients, and so rarely see the root window anyway.
  438.               [ Thanks to Qiang Alex Zhao (azhao@cs.arizona.edu) 
  439.             for reminding me of this one. --ed.]
  440. A Quicker Mouse
  441. - - - - - - - -
  442.  
  443.   Using xset, you can adjust how fast your pointer moves on the screen
  444.   when you move your mouse.  I like to be able to send my pointer
  445.   across the screen with just a flick of the wrist, and so I use
  446.   "xset m 5 10" in my .xinitrc file.  See the xset man page for further
  447.   ideas and information.
  448.  
  449.   Hint: sometimes you may want to *slow down* your mouse tracking for
  450.   fine work.  To cover my options, I have placed a number of different
  451.   mouse setting commands into menus in my window manager.  
  452.   e.g. (for twm) :
  453.       menu "mouse settings"
  454.       {
  455.         "Mouse Settings:"            f.title
  456.     "  Very Fast"                ! "xset m 7 10 &"
  457.     "  Normal (Fast)"            ! "xset m 5 10 &"
  458.     "  System Default (Un-Accelerated)"    ! "xset m default &"
  459.     "  Glacial"                ! "xset m 0 10 &"
  460.       }
  461.  
  462. Programming Thoughts
  463. - - - - - - - - - - -
  464.  
  465.   Joe English (joe@trystero.art.com) :
  466.     To speed up applications that you're developing, there are tons of
  467.     things you can do.  Some that stick out:
  468.  
  469.     * For Motif programs, don't set XmFontList resources for individual
  470.       buttons, labels, lists, et. al.; use the defaultFontList or
  471.       labelFontList or whatever resource of the highest-level manager
  472.       widget.  Again, stick to as few fonts as possible.
  473.  
  474.     * Better yet, don't use Motif at all.  It's an absolute pig.
  475.  
  476.     * Don't create and destroy widgets on the fly.  Try to reuse them.
  477.       (This will avoid many problems with buggy toolkits, too.)
  478.  
  479.     * Use a line width of 0 in GCs.  On some servers this makes a HUGE
  480.       difference.
  481.  
  482.     * Compress and collapse multiple Expose events.  This can make the
  483.       difference between a fast application and a completely unusable
  484.       one.
  485.  
  486.   Francois Staes (frans@kiwi.uia.ac.be) :
  487.     Just a small remark: I once heard that using a better malloc
  488.     function would greatly increase performance of Xt based
  489.     applications since they use malloc heavily. They suggested trying
  490.     out the GNUY malloc, but I didn't find the time yet. I did some
  491.     tests on small programs just doing malloc and free, and the
  492.     differences were indeed very noticeable ( somewhat 5 times faster)
  493.  
  494.   [ Any confirmation on this from anyone?  --ed.]
  495.  
  496. Say What!?
  497. - - - - - - 
  498.  
  499.   Some contributors proposed ideas that seem right off the wall at first:
  500.  
  501.   David B. Lewis (by day: dbl@osf.org, by night: david%craft@uunet.uu.net) :
  502.     How about this: swap displays with someone else. Run all your programs
  503.     on the other machine and display locally; the other user runs off your
  504.     machine onto the other display. Goal: reduce context switches in the
  505.     same operation between client and server.
  506.  
  507.   I'm not in a situation where I can easily try this, but I have received
  508.   the following confirmation...
  509.  
  510.   Michael Salmon (Michael.Salmon@eos.ericsson.se):
  511.     I regularly run programs on other machines and I notice a big
  512.     difference. I try to run on a machine where I will reduce net usage
  513.     and usually with nice to reduce the impact of my intrusion. This
  514.     helps a lot on my poor little SS1+ with only 16 MB, it was
  515.     essential when I only had 8 MB.
  516.  
  517.   Casey Leedom (casey@gauss.llnl.gov) :
  518.     [The X11 Server and the client are] competing for the same CPU as
  519.     your server when you run it on the same machine.  Not really a
  520.     major problem, except that the X11 client and the server are in
  521.     absolute syncronicity and are context thrashing.
  522.  
  523.   Timothy H Panton (thp@westhawk.uucp) :
  524.     Firstly it relies on the fact that most CPU's are mostly idle, X's
  525.     cpu usage is bursty.  so the chances of you and your team-mate
  526.     doing something cpu-intensive at the same time is small. If they
  527.     are not then you get twice the cpu+memory available for your
  528.     action.
  529.  
  530.     The second factor is that context switches are expensive, using 2
  531.     cpu's halves them, you pay a price due to the overhead of going
  532.     over the network, but this is offset in most cases by the improved
  533.     buffering of a network (typically 20k vs 4k for a pipe), allowing
  534.     even fewer context switches.
  535.  
  536. ----------------------------
  537. Other Sources of Information
  538. ----------------------------
  539.  
  540.   Adrian Nye (adrian@ora.com):
  541.     A lot more tips on performance are in the paper "Improving X
  542.     Application Performance" by Chris D. Peterson and Sharon Chang, in
  543.     Issue 3 of The X Resource.
  544.  
  545.     An earlier version of this paper appeared in the Xhibition 1992
  546.     conference proceedings.
  547.  
  548.     This paper is absolutely essential reading for X programmers.
  549.  
  550.   [Seems I've got some competition. :-)  --ed.]
  551.   
  552. --------------
  553. Author & Notes
  554. --------------
  555.   This list is currently maintained by Art Mulder (art@cs.ualberta.ca)
  556.  
  557.   Suggestions, corrections, or submission for inclusion in this list
  558.   are gladly accepted.  Layout suggestions and comments (spelling
  559.   mistak's too! :-) are also welcome.
  560.  
  561.   Currently I have listed all contributors of the various comments and
  562.   suggestions.  If you do not want to be credited, please tell me.
  563.  
  564.   speedup-x-faq is copyright (c) 1992 by Arthur E. Mulder
  565.  
  566.   You may copy this document in whole or in part as long as you don't
  567.   try to make money off it, or pretend that you wrote it.
  568.  
  569. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  570. --
  571.  ...art mulder ( art@cs.ualberta.ca )    | "Do not be conformed to this world,
  572.  Department of Computing Science         |  but be transformed by the renewal
  573.  University of Alberta, Edmonton, Canada |  of your mind, ..."  Romans 12:2
  574.